package com.cq.androidtools.room1

import androidx.room.*

/**
 * 作者: CQ
 * 日期: 2021-05-11
 * 说明:
 */
@Dao
interface BookDao {
    @Insert(onConflict = OnConflictStrategy.REPLACE)
    fun insertBook(book: Book)

    @Query("delete from Book")
    fun deleteAllUser()

    @Query("update sqlite_sequence SET seq = 0 where name ='Book'")
    fun deleteAll()

    @Delete
    fun delete(book: Book)

}